package de.htw.praxisprojekt.data.draw;

import java.awt.Graphics2D;

import de.htw.praxisprojekt.Vector2D;

public class DrawArc extends DrawObject{

	private Vector2D point=new Vector2D();
	private int radius=20;
	private int angleFrom;
	private int angleSize;

	public DrawArc(Vector2D point,int angleFrom,int angleSize){
		this.angleFrom=angleFrom;
		this.angleSize=angleSize;
		this.point.set(point);
	}

	public DrawArc setRadius(int radius){
		this.radius=radius;
		return this;
	}

	@Override
	public void draw(Graphics2D g2d){
		g2d.setColor(color);
		int height=g2d.getClipBounds().height;
		g2d.drawArc(point.getX()-radius/2,height-point.getY()-radius/2,radius,radius,angleFrom,angleSize);
	}
}